﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Protegidos/Administracao/GENTE_Adm.master" AutoEventWireup="true" CodeFile="acCadPatrocinadores.aspx.cs" Inherits="Protegidos_Administracao_Cadastros_acCadPatrocinadores" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cphSubConteudo" Runat="Server">

<table width="99%" align="center">
    <tr>
        <td>
              
            <div class="Titulo01">Dados Cadastrais</div>
            <div class="Titulo02">Cadastros / Gerais / Patrocinadores</div>

        </td>    
    </tr>
    
    <tr>
        <td>
            
            <table width="99%" align="right">
                <tr>
                    <td>
                        
			            <telerik:RadTabStrip ID="RadTabStrip2" runat="server" Skin="Telerik" MultiPageID="RadMultiPage1" SelectedIndex="0">
                            <Tabs>
                                <telerik:RadTab Text="Dados Gerais" runat="server" Selected="True">
                                </telerik:RadTab>
                                <telerik:RadTab Text="Contatos" runat="server">
                                </telerik:RadTab>
                                <telerik:RadTab Text="Relação Prestadores" runat="server">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
			            
			            <telerik:RadMultiPage runat="server" ID="RadMultiPage1" SelectedIndex="0">
                            <telerik:RadPageView runat="server" ID="RadPageView1">
                            
                                <!-- INICIO - Dados Gerais -->
                                
                                <table width="100%" align="right">
                                    <tr>
                                        <td>
                                            <div class="subTitulo_pagina">Dados Principais</div>
                                            <div class="espaco"></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table class="textoCZ_12">
                                                <tr>
                                                    <td style="width: 150px">CNPJ:</td>
                                                    <td>
                                                        <asp:TextBox ID="txtCNPJ" runat="server"></asp:TextBox>&nbsp;&nbsp;
                                                        <asp:Button ID="btnVerificar" runat="server" Text="Verificar" Width="90px" onclick="btnVerificar_Click" />
                                                        <asp:Label ID="lblMsg" runat="server" Text="" CssClass="textoVR_11B"></asp:Label>
                                                    </td>
                                                </tr>
                                                <tr runat="server" id="trTipoOrgan" >
                                                    <td>Tipo Organização:</td>
                                                    <td>
                                                        <asp:CheckBox ID="cbPatrocidador" runat="server" Text="" Enabled="false" />Patrocinador&nbsp;&nbsp;
                                                        <asp:CheckBox ID="cbPrestador" runat="server" Text="" Enabled="false" />Prestador&nbsp;&nbsp;
                                                        <asp:CheckBox ID="cbSindicato" runat="server" Text="" Enabled="false" />Sindicato&nbsp;&nbsp;
                                                        <asp:CheckBox ID="cbFornecedor" runat="server" Text="" Enabled="false" />Fornecedor
                                                    </td>
                                                </tr>
                                                <tr runat="server" id="trRazaoSocial">
                                                    <td>Razão Social:</td>
                                                    <td><asp:TextBox ID="txtRazaoSocial" runat="server" Width="300px"></asp:TextBox></td>
                                                </tr>
                                                <tr runat="server" id="trNomeFantasia">
                                                    <td>Nome Fantasia:</td>
                                                    <td><asp:TextBox ID="txtNomeFantasia" runat="server" Width="300px"></asp:TextBox></td>
                                                </tr>
                                                <tr runat="server" id="trStatus">
                                                    <td>Status:</td>
                                                    <td>
                                                        <telerik:RadComboBox ID="rcbStatus" runat="server" Skin="Telerik" Width="200px">
                                                            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                        </telerik:RadComboBox>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                                
                                <!-- FIM - Dados Gerais -->
                            
                            </telerik:RadPageView>
                            
                            <telerik:RadPageView runat="server" ID="RadPageView2">
                            
                                <!-- INICIO - Contatos -->
                                
                                <table width="100%" align="right">
                                    <tr>
                                        <td>
                                            <div class="subTitulo_pagina">Telefones</div>
                                            <div class="espaco"></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            
                                            <!-- INICIO - GRID -->
                                            <telerik:RadGrid ID="rgTelefones" runat="server" Skin="Telerik" 
                                                GridLines="None" AllowPaging="True" AllowSorting="True" Width="97%" 
                                                AutoGenerateColumns="False" ShowStatusBar="True" 
                                                OnPreRender="rgTelefones_PreRender"
                                                OnNeedDataSource="rgTelefones_NeedDataSource"
                                                PageSize="20"  >
                                                <HeaderContextMenu Skin="WebBlue">
                                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                </HeaderContextMenu>
                                                
                                                <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top" 
                                                    DataKeyNames="id_tel_organizacao" Font-Bold="False" 
                                                    Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                                                    Font-Underline="False" Name="TableViewTelefone">
                                                    
                                                    <Columns>
                                                        <telerik:GridBoundColumn UniqueName="ddd_telefone" HeaderText="ddd_telefone" DataField="ddd_telefone" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="telefone" HeaderText="telefone" DataField="telefone" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="200px"></telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="ramal" HeaderText="ramal" DataField="ramal" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
                                                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Editar" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Remover" CommandName="Delete" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridButtonColumn>
                                                    </Columns>
                                                        
                                                    <EditFormSettings EditFormType="Template">
                                                        <FormTemplate>
                                                            <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="BORDER-COLLAPSE: collapse">
                                                                <tr class="EditFormHeader" align="left">
	                                                                <td colspan="2"><b>&nbsp;&nbsp;Dados do Telefone</b></td>
                                                                </tr>
                                                                <tr align="left">
	                                                                <td>
		                                                                
		                                                                <table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0">
			                                                                <tr>
				                                                                <td width="200"></td>
				                                                                <td></td>
			                                                                </tr>
			                                                                <tr>
				                                                                <td width="200">&nbsp;&nbsp;Tipo:</td>
				                                                                <td><asp:DropDownList ID="ddlFornecedor" runat="server" Width="400px"></asp:DropDownList></td>
			                                                                </tr>
			                                                                <tr>
			                                                                    <td width="200">&nbsp;&nbsp;Contato:</td>
                                                                                <td><asp:TextBox ID="TextBox2" runat="server" Width="300px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="200">&nbsp;&nbsp;DDD:</td>
                                                                                <td><asp:TextBox ID="TextBox3" runat="server" Width="30px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="200">&nbsp;&nbsp;Telefone:</td>
                                                                                <td><asp:TextBox ID="TextBox4" runat="server" Width="80px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="200">&nbsp;&nbsp;Ramal:</td>
                                                                                <td><asp:TextBox ID="TextBox5" runat="server" Width="30px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
				                                                                <td width="200">&nbsp;&nbsp;Status:</td>
				                                                                <td><asp:DropDownList ID="DropDownList1" runat="server" Width="400px"></asp:DropDownList></td>
			                                                                </tr>
		                                                                </table>
		                                                                
	                                                                </td>
                                                                </tr>
                                                                <tr>
	                                                                <td align="right" colspan="2">
		                                                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Inserir" : "Atualizar" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>&nbsp;
                                                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </FormTemplate>
                                                    </EditFormSettings>
                                                    
                                                    <PagerStyle NextPageText="Próximo" PrevPageText="Anterior" />
                                                    <CommandItemSettings AddNewRecordText=" Adicionar Telefone" RefreshText=" Atualizar" />
                                                </MasterTableView>
                                                <FilterMenu Skin="WebBlue">
                                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                </FilterMenu>
                                                <StatusBarSettings LoadingText="Aguarde..." ReadyText="Pronto" />
                                            </telerik:RadGrid>
                                            <!-- FIM - GRID -->
                                            
                                        </td>
                                    </tr>
                                    
                                    <tr>
                                        <td>
                                            <div class="subTitulo_pagina">Endereços</div>
                                            <div class="espaco"></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            
                                            <!-- INICIO - GRID -->
                                            <telerik:RadGrid ID="rgEnderecos" runat="server" Skin="Telerik" 
                                                GridLines="None" AllowPaging="True" AllowSorting="True" Width="97%" 
                                                AutoGenerateColumns="False" ShowStatusBar="True" 
                                                OnPreRender="rgEnderecos_PreRender"
                                                OnNeedDataSource="rgEnderecos_NeedDataSource"
                                                PageSize="20"  >
                                                <HeaderContextMenu Skin="WebBlue">
                                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                </HeaderContextMenu>
                                                
                                                <MasterTableView GridLines="None" Width="100%" CommandItemDisplay="Top" 
                                                    DataKeyNames="id_tel_organizacao" Font-Bold="False" 
                                                    Font-Italic="False" Font-Overline="False" Font-Strikeout="False" 
                                                    Font-Underline="False" Name="TableViewTelefone">
                                                    
                                                    <Columns>
                                                        <telerik:GridBoundColumn UniqueName="Logradouro" HeaderText="Logradouro" DataField="Logradouro" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="endereco" HeaderText="endereco" DataField="endereco" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="200px"></telerik:GridBoundColumn>
                                                        <telerik:GridBoundColumn UniqueName="numero" HeaderText="numero" DataField="numero" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="100px"></telerik:GridBoundColumn>
                                                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" EditText="Editar" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridEditCommandColumn>
                                                        <telerik:GridButtonColumn UniqueName="DeleteColumn" Text="Remover" CommandName="Delete" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" HeaderStyle-Width="60px"></telerik:GridButtonColumn>
                                                    </Columns>
                                                        
                                                    <EditFormSettings EditFormType="Template">
                                                        <FormTemplate>
                                                            <table id="Table2" cellspacing="2" cellpadding="1" width="100%" border="1" rules="none" style="BORDER-COLLAPSE: collapse">
                                                                <tr class="EditFormHeader" align="left">
	                                                                <td colspan="2"><b>&nbsp;&nbsp;Dados do Endereço</b></td>
                                                                </tr>
                                                                <tr align="left">
	                                                                <td>
		                                                                
		                                                                <table id="Table3" cellspacing="1" cellpadding="1" width="100%" border="0">
			                                                                <tr>
				                                                                <td width="200"></td>
				                                                                <td></td>
			                                                                </tr>
			                                                                <tr>
				                                                                <td width="200">&nbsp;&nbsp;Tipo:</td>
				                                                                <td><asp:DropDownList ID="ddlFornecedor" runat="server" Width="400px"></asp:DropDownList></td>
			                                                                </tr>
			                                                                <tr>
			                                                                    <td width="200">&nbsp;&nbsp;Contato:</td>
                                                                                <td><asp:TextBox ID="TextBox2" runat="server" Width="300px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="200">&nbsp;&nbsp;DDD:</td>
                                                                                <td><asp:TextBox ID="TextBox3" runat="server" Width="30px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="200">&nbsp;&nbsp;Telefone:</td>
                                                                                <td><asp:TextBox ID="TextBox4" runat="server" Width="80px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
                                                                                <td width="200">&nbsp;&nbsp;Ramal:</td>
                                                                                <td><asp:TextBox ID="TextBox5" runat="server" Width="30px"></asp:TextBox></td>
                                                                            </tr>
                                                                            <tr>
				                                                                <td width="200">&nbsp;&nbsp;Status:</td>
				                                                                <td><asp:DropDownList ID="DropDownList1" runat="server" Width="400px"></asp:DropDownList></td>
			                                                                </tr>
		                                                                </table>
		                                                                
	                                                                </td>
                                                                </tr>
                                                                <tr>
	                                                                <td align="right" colspan="2">
		                                                                <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Inserir" : "Atualizar" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'></asp:Button>&nbsp;
                                                                        <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </FormTemplate>
                                                    </EditFormSettings>
                                                    
                                                    <PagerStyle NextPageText="Próximo" PrevPageText="Anterior" />
                                                    <CommandItemSettings AddNewRecordText=" Adicionar Endereço" RefreshText=" Atualizar" />
                                                </MasterTableView>
                                                <FilterMenu Skin="WebBlue">
                                                    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
                                                </FilterMenu>
                                                <StatusBarSettings LoadingText="Aguarde..." ReadyText="Pronto" />
                                            </telerik:RadGrid>
                                            <!-- FIM - GRID -->
                                            
                                        </td>
                                    </tr>
                                </table>
                                
                                <!-- FIM - Contatos -->
                            
                            </telerik:RadPageView>
                            
                            <telerik:RadPageView runat="server" ID="RadPageView3">
                            
                                <!-- INICIO - Contatos -->
                                
                                <table width="100%" align="right">
                                    <tr>
                                        <td>
                                            <div class="subTitulo_pagina">Relação Patrocinadores</div>
                                            <div class="espaco"></div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            
                                        </td>
                                    </tr>
                                </table>
                                
                                <!-- FIM - Contatos -->
                            
                            </telerik:RadPageView>
                        </telerik:RadMultiPage>
                        
                    </td>
                </tr>
                
                <tr>
                    <td align="right">
                    <br /><br />
                        <asp:Label ID="lblResultado" runat="server" Text=""></asp:Label>&nbsp;&nbsp;
                        <asp:Button ID="btnSalvar" runat="server" Text="Salvar" Width="110px" onclick="btnSalvar_Click" />&nbsp;&nbsp;
                        <asp:Button ID="btnLimpar" runat="server" Text="Limpar" Width="110px" 
                            onclick="btnLimpar_Click" />
                    </td>
                </tr>
                <tr>
                    <td align="right">
                    <br />
                        <a href="acPatrocinadores.aspx">Voltar</a>
                    </td>
                </tr>
                
            </table>
            
        </td>    
    </tr>    
    
</table>

</asp:Content>

